﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.Runtime.Serialization;

namespace ScrumTime.Models
{
    public class UserInfo 
    {
        ScrumTime.Models.User _user;

        System.Web.Security.MembershipUser _menbershipUser;

        public UserInfo(ScrumTime.Models.User user , System.Web.Security.MembershipUser menbershipUser   ) {
            _user = user;
            _menbershipUser = menbershipUser;
        }

        
        public String Mail {
            get {
                return _menbershipUser.Email;
            }            
        }

        public String UserName
        {
            get
            {
                return _menbershipUser.UserName;
            }
        }

        public int UserIdWeb {
            get {
                int id = 2323;
                if ( this._user!=null ) {
                    id = _user.UserIdWeb;                    
                }
                return id;
            }
        }

        public String UserKey {
            get {
                return this._menbershipUser.ProviderUserKey.ToString();
            }
        }

    }
}